package com.manager.common.token;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class TokenInit implements ApplicationRunner {


    @Value("${token.name}")
    private String tokenName;

    @Value("${token.period.time}")
    private int tokenPeriodTime;


    @Override
    public void run(ApplicationArguments args) throws Exception {
        TokenManager.getInstance().init(tokenName,tokenPeriodTime);

    }
}
